<template>
	<view>
		<!--扫一扫-->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
				result: '',
				merchantsId: '',
			};
		},
		onLoad() {
			this.scan()
		},
		methods: {
			scan(){
				var me = this;
				uni.scanCode({
					success: (res) => {
						console.log(res)
						var path = res.path
						var scene = path.substring(path.indexOf('scene=') + 6)
						console.log(scene)
						//存二维码内容缓存
						uni.setStorageSync('content', scene)
						uni.redirectTo({
							url: '/pages/user/scan/billing'
						});
				
					},
					fail:() =>{
						uni.reLaunch({
							url:'/pages/user/home/index'
						})
					}
				})
			}
			
		}
	}
</script>


<style>
	.scan-result {
		min-height: 50rpx;
		line-height: 50rpx;
	}
</style>
